package com.letcoding.spiderAutoHome.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.letcoding.spiderAutoHome.dao.CarTestDao;
import com.letcoding.spiderAutoHome.module.CarTest;
import com.letcoding.spiderAutoHome.service.CarTestService;
import org.springframework.stereotype.Service;

//CarTestServiceImpl 需要先继承ServiceImpl，不继承直接实现的话，该类就是抽象类
@Service
public  class CarTestServiceImpl extends ServiceImpl<CarTestDao, CarTest> implements CarTestService {
    @Override
    public Page<CarTest> queryTitleByPage(long page, long pagesize) {
        Page<CarTest> queryPage = new Page<> (page, pagesize);
        QueryWrapper<CarTest> queryWrapper = new QueryWrapper<> ();
        queryWrapper.select ("title");
        return baseMapper.selectPage (queryPage, queryWrapper);
    }
}
